<?php
//------------------------
// 后台用户验证器
//-------------------------

namespace app\common\validate;

use think\Validate;

class System extends Validate
{
    protected $rule = [
        // 基础信息
        'prompt|网站关闭时提示信息'                  => 'require|max:64',
        'record|备案号'                              => 'require|max:32',
        'email|联系邮箱'                             => 'require|email',
        'remark|网站公告'                            => 'require|max:256',
        // 推广
        'title|网站名'                               => 'require|max:32',
        'keyword|关键字'                             => 'max:128',
        'author|站长'                                => 'require|max:64',
        'describe|网站描述'                          => 'max:256',
        // 微信支付
        'appid|绑定支付公众号的APPID'                => 'require|max:128',
        'appsecret|绑定支付公众号的APPSECRET'        => 'require|max:128',
        'mchid|商户号(MCHID)'                        => 'require|max:128',
        'mchkey|商户支付密钥'                        => 'require|max:128',
        //支付宝
        'aliaccounts|收款支付宝账号'                 => 'require|max:64',
        'alipid|合作者身份'                          => 'require|max:256',
        'alikey|安全校验码'                          => 'require|max:256',
        //网站信息邮箱
        'smtpserver|SMTP服务器'                      => 'require|max:64',
        'sendemail|发件邮箱'                         => 'require|email',
        'emailpassword|邮箱密码'                     => 'require|max:32',
        'addresser|发件人'                           => 'require|max:32',
        //公用
        'status|状态'               => 'number',
    ];

    protected $message = [

    ];


    protected $scene = [
        'basics'  => ['prompt','record','email','remark','status'],
        'seo'     => ['title','keyword','author','describe','status'],
        'wxpay'   => ['appid','appsecret','mchid','mchkey','status'],
        'alipay'  => ['aliaccounts','alipid','alikey','status'],
        'email'   => ['smtpserver','sendemail','emailpassword','addresser','status'],
    ];
}